package org.artifact.core.lang;

import javax.sql.DataSource;

import org.artifact.core.context.bytebuf.ArrayByteBuffFactory;
import org.artifact.core.context.bytebuf.IByteBuffFactory;
import org.artifact.core.context.id.IDFactory;
import org.artifact.core.context.json.FastJsonFactory;
import org.artifact.core.context.json.IJsonFactory;
import org.artifact.core.context.packet.IPacketFactory;
import org.artifact.core.context.packet.SimplePacketFactory;
import org.artifact.core.context.session.ISessionFactory;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.mongodb.client.MongoDatabase;

import cn.hutool.db.nosql.redis.RedisDS;
import cn.hutool.setting.Setting;
import lombok.Data;
@SuppressWarnings("rawtypes")
@Data
public final class IContext {
	/** 文件配置 */
	private Setting setting;

	private IJsonFactory jsonFactory = new FastJsonFactory();
	
	private IPacketFactory packetFactory = new SimplePacketFactory();
	
	private ISessionFactory sessionFactory;
	
	private IByteBuffFactory byteBuffFactory = new ArrayByteBuffFactory();
	
	private DataSource dataSource;
	
	private MongoDatabase mongoDatabase;
	
	private RedisDS redisDS;
	
	private IDFactory idFactory;
	
	/**
	 * Spring上下文
	 * new FileSystemXmlApplicationContext(path);
	 * new ClassPathXmlApplicationContext(path);
	 */
	private ApplicationContext springContext;
}
